determine the intervals a function is increasing